//
//  ExchangeView.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/4/27.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit

class ExchangeView: UIView {
    lazy var addBtn: UIButton = {
       let btn = UIButton()
      
        
       return btn
    }()
    
    lazy var subBtn: UIButton = {
        let btn = UIButton()
      
        
        return btn
    }()
    
    lazy var textField: BaseTextField = {
       let textField = BaseTextField(changeView: nil, szBounds: CGRect.zero)
        textField.font = UIFont.systemFont(ofSize: 11)
        textField.keyboardType = UIKeyboardType.namePhonePad
        textField.textAlignment = NSTextAlignment.center
       return textField
    }()

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.layer.border =  ThemeManager.ThemeColorKeys.borderColor
        self.layer.borderWidth = 0.5
        self.setUpUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUpUI() {
        self.addSubview(addBtn)
        addBtn.snp.makeConstraints { (make) in
            make.right.equalToSuperview()
            make.top.bottom.equalToSuperview()
            make.width.equalTo(55)
        }
        
        self.addSubview(subBtn)
        subBtn.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
            make.width.equalTo(55)
        }
        
        self.addSubview(textField)
        textField.snp.makeConstraints { (make) in
            make.left.equalTo(subBtn.snp.right)
            make.right.equalTo(addBtn.snp.left)
            make.top.bottom.equalToSuperview()
        }
                
    }
    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */

}
